<?php
class Currency extends Zend_Db_Table_Abstract {
	
	protected $_primary = 'id';
	protected $_name = 'currency';
	
	/**
	 * Find currency by code.
	 * 
	 * @param $currencyCode
	 * @return return currency obj
	 */
	public function findByCode($currencyCode) {
		$select = $this->select()->where('upper(currency_code)=upper(?)', trim($currencyCode));
		return $this->fetchRow($select);
	}
}
?>